﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace YummyGame.Framework.Test
{
    public class TaskArgs1 : YummyTask<float>
    {
        private float _t;
        private float total;      

        public TaskArgs1(float count)
        {
            total = count;
        }
        protected override void OnTaskUpdateInternal()
        {
            _t += Time.deltaTime;
            if (_t >= total)
            {
                State = TaskState.Finish;
                target = _t;
            }
        }

        public override void Reset()
        {
            base.Reset();
            _t = 0;
        }
    }
}
